package com.wkbb.common.enums;

/**
 * @author luowenyan
 * 区域类型 1校门 2宿舍
 */
public enum DoorAreaTypeEnum {
    /**
     * 校门
     */
    SCHOOL_GATE(1,"校门"),

    /**
     * 宿舍
     */
    DORMITORY(2,"宿舍");

    private DoorAreaTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (DoorAreaTypeEnum areaTypeEnum : DoorAreaTypeEnum.values()) {
            if (areaTypeEnum.getValue().intValue()==value) {
                return areaTypeEnum.getDesc();
            }
        }
        return null;
    }
}
